Integrand size = 39, antiderivative size = 150 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\frac {2 (5 A+3 C) \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b d \sqrt {\cos (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}}+\frac {2 B \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 b d}+\frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {16, 3102, 2827, 2721, 2719, 2715, 2720} \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\frac {2 (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \cos (c+d x)}}{5 b d \sqrt {\cos (c+d x)}}+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b^2 d}+\frac {2 B \sin (c+d x) \sqrt {b \cos (c+d x)}}{3 b d}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}} \]
[In]
[Out]
Rule 16
Rule 2715
Rule 2719
Rule 2720
Rule 2721
Rule 2827
Rule 3102
Rubi steps \begin{align*} \text {integral}& = \frac {\int \sqrt {b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx}{b} \\ & = \frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d}+\frac {2 \int \sqrt {b \cos (c+d x)} \left (\frac {1}{2} b (5 A+3 C)+\frac {5}{2} b B \cos (c+d x)\right ) \, dx}{5 b^2} \\ & = \frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d}+\frac {B \int (b \cos (c+d x))^{3/2} \, dx}{b^2}+\frac {(5 A+3 C) \int \sqrt {b \cos (c+d x)} \, dx}{5 b} \\ & = \frac {2 B \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 b d}+\frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d}+\frac {1}{3} B \int \frac {1}{\sqrt {b \cos (c+d x)}} \, dx+\frac {\left ((5 A+3 C) \sqrt {b \cos (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{5 b \sqrt {\cos (c+d x)}} \\ & = \frac {2 (5 A+3 C) \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b d \sqrt {\cos (c+d x)}}+\frac {2 B \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 b d}+\frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d}+\frac {\left (B \sqrt {\cos (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{3 \sqrt {b \cos (c+d x)}} \\ & = \frac {2 (5 A+3 C) \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b d \sqrt {\cos (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}}+\frac {2 B \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 b d}+\frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b^2 d} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.65 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\frac {2 \sqrt {b \cos (c+d x)} \left (3 (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+5 B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sqrt {\cos (c+d x)} (5 B+3 C \cos (c+d x)) \sin (c+d x)\right )}{15 b d \sqrt {\cos (c+d x)}} \]
[In]
[Out]
Time = 12.44 (sec) , antiderivative size = 316, normalized size of antiderivative = 2.11
method | result | size |
default | \(\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (24 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) C \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-20 B -24 C \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (10 B +6 C \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+15 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-5 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+9 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{15 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(316\) |
parts | \(\frac {2 A \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}-\frac {2 B \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}-\frac {2 C \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(540\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.11 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\frac {-5 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 \, \sqrt {2} {\left (-5 i \, A - 3 i \, C\right )} \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 \, \sqrt {2} {\left (5 i \, A + 3 i \, C\right )} \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, C \cos \left (d x + c\right ) + 5 \, B\right )} \sqrt {b \cos \left (d x + c\right )} \sin \left (d x + c\right )}{15 \, b d} \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {b \cos (c+d x)}} \, dx=\int \frac {\cos \left (c+d\,x\right )\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right )}{\sqrt {b\,\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]